package com.example.fbneo_crc2;

import com.example.fbneo_crc2.gson.VideoBase;
import com.example.fbneo_crc2.gson.VideoBaseList;
import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.Arrays;

public class MainVideoUrl {

    public static void main(String[] str) throws Exception {
        VideoBase videoBase = new Gson().fromJson(FileTool.readFile("D:\\code\\git2\\file_test\\video\\video_json.json"), VideoBase.class);
        for (int i = 0; i < videoBase.getList().size(); i++) {
            if (videoBase.getList().get(i).getTitle().equals("无尽资源")) {
                videoBase.getList().remove(i);
                break;
            }
        }
        videoBase.getList().add(0, new VideoBase.ListBean(
                Arrays.asList(
                        new VideoBaseList(6, "动作片"),
                        new VideoBaseList(7, "喜剧片"),
                        new VideoBaseList(8, "爱情片"),
                        new VideoBaseList(9, "科幻片"),
                        new VideoBaseList(10, "恐怖片"),
                        new VideoBaseList(11, "剧情片"),
                        new VideoBaseList(12, "战争片"),
                        new VideoBaseList(13, "国产剧"),
                        new VideoBaseList(14, "香港剧"),
                        new VideoBaseList(15, "台湾剧"),
                        new VideoBaseList(16, "美国剧"),
                        new VideoBaseList(22, "韩国剧"),
                        new VideoBaseList(23, "日本剧"),
                        new VideoBaseList(24, "海外剧"),
                        new VideoBaseList(25, "大陆综艺"),
                        new VideoBaseList(26, "日韩综艺"),
                        new VideoBaseList(27, "港台综艺"),
                        new VideoBaseList(28, "欧美综艺"),
                        new VideoBaseList(29, "国产动漫"),
                        new VideoBaseList(30, "日韩动漫"),
                        new VideoBaseList(31, "欧美动漫"),
                        new VideoBaseList(32, "悬疑片"),
                        new VideoBaseList(33, "动画片"),
                        new VideoBaseList(34, "犯罪片"),
                        new VideoBaseList(35, "奇幻片"),
                        new VideoBaseList(36, "邵氏电影"),
                        new VideoBaseList(37, "泰剧"),
                        new VideoBaseList(42, "港台动漫"),
                        new VideoBaseList(43, "海外动漫"),
                        new VideoBaseList(54, "女频恋爱"),
                        new VideoBaseList(55, "反转爽剧"),
                        new VideoBaseList(56, "脑洞悬疑"),
                        new VideoBaseList(57, "年代穿越"),
                        new VideoBaseList(58, "古装仙侠"),
                        new VideoBaseList(59, "现代都市"),
                        new VideoBaseList(60, "Netflix电影"),
                        new VideoBaseList(61, "Netflix自制剧"),
                        new VideoBaseList(62, "擦边短剧")
                ), "无尽资源", "https://api.wujinapi.com/api.php/provide/vod/"));
        FileUtil.genModuleTpl("D:\\code\\git2\\file_test\\video\\video_json.json", new Gson().toJson(videoBase));


    }

}
